home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
indeo
/
nwxmas
/
xmascard.c
< prev
next >
Wrap
Text File
|
1993-12-13
|
1KB
|
61 lines
/*
** ╔══════════════════════════════════════════════════════════════╗
** ║ ║
** ║ Copyright (c) 1993 Digital Video Arts, Ltd. ║
** ║ All Rights Reserved ║
** ║ ║
** ╚══════════════════════════════════════════════════════════════╝
**
** Christmas card demo
**
** file - xmas.c - main program;
*/
#include <stdio.h>
#include <fcntl.h>
#include <conio.h>
#include "nw.h"
#include "nwerrno.h"
#include "xmasdemo.h"
main(int argc, char **argv)
{
AvH *a;
ImH *img;
Rect r;
char c;
int i;
InitNewworld();
InitDisplays();
InitImages();
InitAudio();
InitAvss();
while(1) {
if(kbhit()) {
c = getch();
break;
}
PlayVideo();
if(PlayAudio()) break;
}
AvClose(a);
_nwerrno = 0;
if(c == 's') {
onscreen->dbm.GrPlanes = P_YVU;
RECT(r, 0, 0, 512, 480);
img = GrImCompress(&onscreen->dbm, &r, 0l, "NONE", -1L);
McWait(); /* in case decompressing not done */
GrImSave(img, &onscreen->dbm, "new");
}
NwEnd();
}
NwErr(char *cp)
{
printf("%s\n", cp);
NwEnd();
exit(-1);
}